Skip to content

refactor(start-axum): facade slimming — crate split step 3 (#8969) - #12778

Merged
dezren39 merged 1 commit into
mainfrom
archer-lane-bp/8969-facade-slimming
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
archer-lane-bp/8969-facade-slimming

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Step 3 of the pkgs/web-gen-api-axum crate split (#8965), following step 1 (#8967, PR #12395) and step 2 (#8968, PR #12617).

What

  • Remove pkgs/web-gen-api-axum/src/shell.nix — a byte-identical duplicate of the project-root shell.nix sitting in src/ since 2024, referenced by nothing (code search: 0 hits). The facade's src/ now holds exactly what the step-3 scope names: lib.rs (hydrate()), fileserv.rs, main.rs, and the facade re-exports.
  • Add pkgs/web-gen-api-axum/tests/facade_paths.rs — a facade-contract test (ssr-gated, matching the step gates) that references the pre-split public paths through the facade — start_axum::app::App / SimpleCounter, start_axum::dark_mode::DarkModeToggle, start_axum::error_template::{AppError, ErrorTemplate}, start_axum::fileserv::file_and_error_handler — so a dropped or renamed re-export fails the suite at compile time. The project baseline is 0 tests; this is the first.

What did not change

No code moves, no Cargo.toml changes, no behavior change. Verified by source read before the change: the extracted code already lives solely in start-axum-ui (app.rs, dark_mode.rs) and start-axum-error (AppError, ErrorTemplate); the facade's src/app.rs / src/dark_mode.rs / src/error_template.rs hold only the one-line re-exports, and fileserv's use crate::app::App already resolves through the facade's re-export of start-axum-ui — server glue depending downward, per the umbrella's crate map.

Verification

  • fleet-run run 45100026191 on this head, the step-gate set from steps 1–2: cargo check --features ssr; cargo check --locked --features hydrate; cargo check --locked --features ssr; cargo test --locked --features ssr — all green. The suite now runs 1 test (facade_paths_resolve ... ok) where the baseline ran 0.
  • Mutation checks (laptop, same gate shell): dropping ErrorTemplate from the facade shim's export list leaves the lib compiling but fails the new test with error[E0425]: cannot find value ErrorTemplate in module start_axum::error_template at tests/facade_paths.rs:22; renaming the shim's import fails the build with E0432. The test is a working oracle for the facade contract.

Closes #8969


Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

- Remove src/shell.nix from the facade crate: a byte-identical duplicate of
  the project-root shell.nix sitting in src/ since 2024, referenced by
  nothing. Facade src/ now holds exactly lib.rs (hydrate()), fileserv.rs,
  main.rs and the three facade re-export shims (app, dark_mode,
  error_template).
- Add tests/facade_paths.rs: a facade-contract test (ssr-gated) that
  references the pre-split public paths through the facade
  (start_axum::app::App / SimpleCounter,
  start_axum::dark_mode::DarkModeToggle,
  start_axum::error_template::{AppError, ErrorTemplate},
  start_axum::fileserv::file_and_error_handler) so a dropped re-export
  fails the suite. The project baseline is 0 tests; this is the first.

No code moves and no behavior change: the extracted code already lives
solely in start-axum-ui / start-axum-error, and fileserv's
use crate::app::App already resolves through the facade re-export of
start-axum-ui.

Closes #8969
@dezren39
dezren39 requested a review from a team as a code owner November 23, 2026 02:32
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c20fbe40-7d9a-4cb9-a077-17650dd5655d
Commits

Reviewing files that changed from the base of the PR and between 45191b4 and a1f23ff.

Files selected for processing: 2

  • pkgs/web-gen-api-axum/src/shell.nix
  • pkgs/web-gen-api-axum/tests/facade_paths.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit cd688f5 into main Nov 23, 2026
1 check passed
@dezren39
dezren39 deleted the archer-lane-bp/8969-facade-slimming branch November 23, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pkgs/web-gen-api-axum crate split — step 3: facade slimming (fileserv + server stay in start-axum)

1 participant